package chixing.day09.work1;

public class Computer {
    public static void main(String[] args) {

        VideoCard videoCard = new DmengVideoCard();
        Cpu cpu = new InterCpu();
        Mainboard mainboard = new Mainboard(videoCard, cpu);
        openPC(mainboard);
        closePC(mainboard);
    }
    public static void openPC( Mainboard mainboard) {
        System.out.println("Starting the computer...");
        mainboard.run();
    }
    public static void closePC(Mainboard mainboard) {
        System.out.println("Shutting down the computer...");
        mainboard.close();
    }
}
